
const { apiPreFix } = require('../config').server
const userController = require('../controllers/admin/user')
module.exports = (router) => {
  // 登陆
  router.post(`${apiPreFix}/admin/login`, async ctx => {
    await userController.login(ctx)
  })
  // 登出
  router.post(`${apiPreFix}/admin/logout`, async ctx => {
    await userController.logout(ctx)
  })
  // 用户信息
  router.post(`${apiPreFix}/admin/userInfo`, async ctx => {
    await userController.userInfo(ctx)
  })
}